home *** CD-ROM | disk | FTP | other *** search
- /*************************************************************************
- * "siwin.h"
- *-------------------------------------------------------------------------
- * Window library
- * Copyright (c) 1993, TaroPYON
- *************************************************************************/
-
- #ifndef _SIWIN_H
- #define _SIWIN_H
-
- #include <time.h>
- #ifndef _SIDEFS_H
- # include <sidefs.h>
- #endif
- #ifndef _SICTRL_H
- # include <sictrl.h>
- #endif
- #ifndef _SISCN_H
- # include <siscn.h>
- #endif
-
- typedef struct _win_t
- {
- struct _win_t *next, *prev;
- struct _win_t *parent, *child; /* 未使用 */
-
- UINT att; /* 属性 */
- UINT stt; /* ステータス */
- int prio; /* プライオリティ */
- int act; /* アクティブフラグ */
- FRAME_T fr; /* 表示範囲 */
- LAYER_T *layer; /* 仮想VRAM表示用 */
- MSK_T mskDsp; /* 表示マスク用 */
-
- int accChk; /* アクセスチェック */
- time_t accTime; /* アクセスタイム */
- UINT accCnt; /* アクセスカウント */
-
- int page; /* 表示ページ */
-
- CLIP_T *clpDrw; /* 描画用(実際の描画に使用) */
- CLIP_T *clpDsp; /* 描画範囲(固定) */
- CLIP_T *clpMsk; /* マスク範囲 */
- MSK_T msk; /* マスク作業用 */
-
- int (*dspFunc)(struct _win_t *);
- /* 表示関数 */
- int (*ctrFunc)(struct _win_t *,int,...);
- /* コントロール関数 */
- void *ptr;
- void *winCt;
- } WIN_T;
-
- #define WIN_ATT_DSPMSK (0x0001_0000) /* マスクを使用 */
-
- #define WIN_STT_OFF (0x0000_0000) /* 非表示 */
- #define WIN_STT_SLEEP (0x0000_0001) /* 動作停止 */
- #define WIN_STT_WAKE (0x0000_0002) /* 動作 */
-
- #define WINPRIO_BAS ( 0) /* ベースウィンドゥ */
- #define WINPRIO_APL ( 8) /* 一般アプリ */
- #define WINPRIO_DLG (16) /* ダイアログ */
-
- typedef struct
- {
- UINT att; /* 属性 */
- UINT stt; /* ステータス */
- UINT accCnt; /* アクセスカウント */
-
- COLOR_T basCol; /* 背景色 */
-
- int winNum; /* ウィンドゥ数 */
- WIN_T *winTop; /* 表示順に並べる */
- WIN_T *winLast;
- } WINCTRL_T;
-
- extern WINCTRL_T *SiWinCt;
-
- /*----------------------------------------------------------------------*/
- #define WINCT_STT_REWRTIGN (0x0000_00001) /* 画面書き換え禁止 */
-
- /*----------------------------------------------------------------------*/
- extern int WIN_sysInit(void);
- extern void WIN_sysTerm(void);
- extern WINCTRL_T *WIN_ctrlOpen(void);
- extern void WIN_ctrlClose( WINCTRL_T *winCt);
- extern WIN_T *WIN_openBasWin( WINCTRL_T *winCt, int (*func)(WIN_T *), void *ptr );
- extern int win_moveSrv( WIN_T *win, FRAME_T *newFr );
- extern int WIN_link( WIN_T *win );
- extern WIN_T *WIN_open( WINCTRL_T *winCt, int prio, int (*func)(WIN_T *), void *ptr );
- extern void WIN_unlink( WIN_T *win );
- extern void WIN_close( WIN_T *win );
- extern int win_makeClip( WIN_T *topWin, CLIP_T **clpTop, FRAME_T *bsFr, FRAME_T *fr );
- extern int win_makeDspClip( WIN_T *win );
- extern int win_makeMoveClip( CLIP_T **clpTop, FRAME_T *bsFr, FRAME_T *fr );
- extern int win_chkPoint( WIN_T *win, POINT_T *point );
- extern int WIN_dsp( WIN_T *win, CLIP_T *clpFr );
- extern int WIN_active( WIN_T *win );
- extern int WIN_off( WIN_T *win );
- extern int WIN_resize( WIN_T *win, FRAME_T *newFr );
- extern int WIN_redsp_all(WINCTRL_T *winCt);
-
- typedef struct
- {
- CLIP_T clpWork;
- CLIP_T *clpSave;
- } WINCLIPWORK_T;
-
- extern int WIN_setClip(WIN_T *win, WINCLIPWORK_T *work);
- extern int WIN_resetClip(WIN_T *win, WINCLIPWORK_T *work);
-
- /*----------------------------------------------------------------------*/
- extern void ClipFree( REG CLIP_T *clpTop );
- extern int ClipDup( CLIP_T **clpNew, CLIP_T *clpSrc );
- extern int ClipMix( CLIP_T **newFr, CLIP_T *clpDsp, CLIP_T *clip );
-
- /*----------------------------------------------------------------------*/
-
- #endif
-